package com.jiandan.business.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jiandan.base.mapper.BeanMapper;
import com.jiandan.business.entity.Cemetery;
import com.jiandan.business.repository.CemeteryDao;
import com.jiandan.business.vo.CemeteryVo;

@Service
@Transactional(readOnly=true)
public class CemeteryServiceImpl implements CemeteryService{
	
	@Autowired
	private CemeteryDao cemeteryDao;
	
	/**
	 * 根据墓地ID获取墓地详细信息.
	 *
	 * @param cemeteryId the cemetery id
	 * @return the cemetery vo
	 */
	public CemeteryVo findCemeteryInfo(Long cemeteryId){
		CemeteryVo vo = new CemeteryVo();
		Cemetery po = cemeteryDao.findOne(cemeteryId);
		BeanMapper.copy(po, vo);
		return vo;
	}

}
